import { getPorts } from '@/components/WorkFlow/utils'
import { uuidv4, NsGraph } from '@antv/xflow'
import { POINT_NODE_KEY } from '../components/Flow/constants'

const nodes: NsGraph.INodeConfig[] = [
  {
    id: 'start',
    label: '开始',
    renderKey: POINT_NODE_KEY,
    width: 70,
    height: 36,
    x: 450,
    y: 200,
    ports: getPorts(),
    data: {
      nodeType: 'start',
      display: '流程开始',
      variables: {
        value: []
      }
    }
  },
  {
    id: 'end',
    label: '结束',
    renderKey: POINT_NODE_KEY,
    width: 70,
    height: 36,
    x: 450,
    y: 400,
    ports: getPorts(),
    data: {
      nodeType: 'end',
      display: '流程结束',
    }
  }
]
const edges: NsGraph.IEdgeConfig[] = []
const data = { nodes, edges }

export default data
